package com.jrx.mservices.feign.controller;

import com.jrx.mservices.feign.model.ServiceInfo;
import com.jrx.mservices.feign.service.FeignService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 消费接口类
 *
 * @author zwg
 * @create 2018-03-06 17:35
 */
@RestController
@RequestMapping("feign")
public class FeignController {

    public static final Logger logger = LoggerFactory.getLogger(FeignController.class);

    @Autowired
    private FeignService feignService;

    @RequestMapping("test")
    public String test(){

        return feignService.provideTestFunc();
    }

    @RequestMapping("testObj")
    public List<ServiceInfo> testObj(){
        return feignService.provideTestObjFunc();
    }
    @RequestMapping("testObjStr")
    public String testObjStr(){
        return feignService.provideTestObjFuncStr();
    }

}
